"use strict";
module.exports = (db, Sequelize) => {
  return db.define(
    "User",
    {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER,
      },
      username: {
        type: Sequelize.STRING,
      },
      password: {
        type: Sequelize.STRING,
      },
      avatar: {
        type: Sequelize.STRING,
      },
      articles: {
        type: Sequelize.INTEGER,
      },
      favs: {
        type: Sequelize.INTEGER,
      },
      is_vip: {
        type: Sequelize.INTEGER,
      },
      email: {
        type: Sequelize.STRING,
      },
      status: {
        type: Sequelize.INTEGER,
      },
    },
    {
      timestamps: false,
      tableName: "users",
    }
  );
};
